Optimal. Leaf size=140 \[ -\frac {4 (-1)^{3/4} a^2 d^{5/2} \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}-\frac {4 i a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 d (d \tan (e+f x))^{3/2}}{3 f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3624, 3609,
3614, 211} \begin {gather*} -\frac {4 (-1)^{3/4} a^2 d^{5/2} \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}-\frac {4 i a^2 d^2 \sqrt {d \tan (e+f x)}}{f}-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}+\frac {4 a^2 d (d \tan (e+f x))^{3/2}}{3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 3609
Rule 3614
Rule 3624
Rubi steps
\begin {align*} \int (d \tan (e+f x))^{5/2} (a+i a \tan (e+f x))^2 \, dx &=-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\int (d \tan (e+f x))^{5/2} \left (2 a^2+2 i a^2 \tan (e+f x)\right ) \, dx\\ &=\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\int (d \tan (e+f x))^{3/2} \left (-2 i a^2 d+2 a^2 d \tan (e+f x)\right ) \, dx\\ &=\frac {4 a^2 d (d \tan (e+f x))^{3/2}}{3 f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\int \sqrt {d \tan (e+f x)} \left (-2 a^2 d^2-2 i a^2 d^2 \tan (e+f x)\right ) \, dx\\ &=-\frac {4 i a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 d (d \tan (e+f x))^{3/2}}{3 f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}+\int \frac {2 i a^2 d^3-2 a^2 d^3 \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx\\ &=-\frac {4 i a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 d (d \tan (e+f x))^{3/2}}{3 f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}-\frac {\left (8 a^4 d^6\right ) \text {Subst}\left (\int \frac {1}{2 i a^2 d^4+2 a^2 d^3 x^2} \, dx,x,\sqrt {d \tan (e+f x)}\right )}{f}\\ &=-\frac {4 (-1)^{3/4} a^2 d^{5/2} \tan ^{-1}\left (\frac {(-1)^{3/4} \sqrt {d \tan (e+f x)}}{\sqrt {d}}\right )}{f}-\frac {4 i a^2 d^2 \sqrt {d \tan (e+f x)}}{f}+\frac {4 a^2 d (d \tan (e+f x))^{3/2}}{3 f}+\frac {4 i a^2 (d \tan (e+f x))^{5/2}}{5 f}-\frac {2 a^2 (d \tan (e+f x))^{7/2}}{7 d f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.58, size = 145, normalized size = 1.04 \begin {gather*} \frac {a^2 d^2 \left (840 i \tanh ^{-1}\left (\sqrt {\frac {-1+e^{2 i (e+f x)}}{1+e^{2 i (e+f x)}}}\right )-i \sec ^3(e+f x) (588 \cos (e+f x)+252 \cos (3 (e+f x))+25 i \sin (e+f x)+85 i \sin (3 (e+f x))) \sqrt {i \tan (e+f x)}\right ) \sqrt {d \tan (e+f x)}}{210 f \sqrt {i \tan (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 341 vs. \(2 (114 ) = 228\).
time = 0.12, size = 342, normalized size = 2.44
method | result | size |
derivativedivides | \(\frac {2 a^{2} \left (-\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {7}{2}}}{7}+\frac {2 i d \left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}+\frac {2 d^{2} \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}-2 i d^{3} \sqrt {d \tan \left (f x +e \right )}+2 d^{4} \left (\frac {i \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f d}\) | \(342\) |
default | \(\frac {2 a^{2} \left (-\frac {\left (d \tan \left (f x +e \right )\right )^{\frac {7}{2}}}{7}+\frac {2 i d \left (d \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}+\frac {2 d^{2} \left (d \tan \left (f x +e \right )\right )^{\frac {3}{2}}}{3}-2 i d^{3} \sqrt {d \tan \left (f x +e \right )}+2 d^{4} \left (\frac {i \left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f d}\) | \(342\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 242 vs. \(2 (117) = 234\).
time = 0.51, size = 242, normalized size = 1.73 \begin {gather*} -\frac {105 \, a^{2} d^{4} {\left (-\frac {\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} - \frac {\left (2 i - 2\right ) \, \sqrt {2} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {d} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {d}}\right )}{\sqrt {d}} - \frac {\left (i + 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}} + \frac {\left (i + 1\right ) \, \sqrt {2} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}}\right )} + 60 \, \left (d \tan \left (f x + e\right )\right )^{\frac {7}{2}} a^{2} - 168 i \, \left (d \tan \left (f x + e\right )\right )^{\frac {5}{2}} a^{2} d - 280 \, \left (d \tan \left (f x + e\right )\right )^{\frac {3}{2}} a^{2} d^{2} + 840 i \, \sqrt {d \tan \left (f x + e\right )} a^{2} d^{3}}{210 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 460 vs. \(2 (117) = 234\).
time = 0.40, size = 460, normalized size = 3.29 \begin {gather*} -\frac {105 \, \sqrt {\frac {16 i \, a^{4} d^{5}}{f^{2}}} {\left (f e^{\left (6 i \, f x + 6 i \, e\right )} + 3 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 3 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (\frac {{\left (-4 i \, a^{2} d^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + \sqrt {\frac {16 i \, a^{4} d^{5}}{f^{2}}} {\left (i \, f e^{\left (2 i \, f x + 2 i \, e\right )} + i \, f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a^{2} d^{2}}\right ) - 105 \, \sqrt {\frac {16 i \, a^{4} d^{5}}{f^{2}}} {\left (f e^{\left (6 i \, f x + 6 i \, e\right )} + 3 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 3 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (\frac {{\left (-4 i \, a^{2} d^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + \sqrt {\frac {16 i \, a^{4} d^{5}}{f^{2}}} {\left (-i \, f e^{\left (2 i \, f x + 2 i \, e\right )} - i \, f\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{2 \, a^{2} d^{2}}\right ) + 8 \, {\left (337 i \, a^{2} d^{2} e^{\left (6 i \, f x + 6 i \, e\right )} + 613 i \, a^{2} d^{2} e^{\left (4 i \, f x + 4 i \, e\right )} + 563 i \, a^{2} d^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 167 i \, a^{2} d^{2}\right )} \sqrt {\frac {-i \, d e^{\left (2 i \, f x + 2 i \, e\right )} + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{420 \, {\left (f e^{\left (6 i \, f x + 6 i \, e\right )} + 3 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 3 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - a^{2} \left (\int \left (- \left (d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}}\right )\, dx + \int \left (d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}} \tan ^{2}{\left (e + f x \right )}\, dx + \int \left (- 2 i \left (d \tan {\left (e + f x \right )}\right )^{\frac {5}{2}} \tan {\left (e + f x \right )}\right )\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.91, size = 192, normalized size = 1.37 \begin {gather*} -\frac {4 \, \sqrt {2} a^{2} d^{\frac {5}{2}} \arctan \left (\frac {8 \, \sqrt {d^{2}} \sqrt {d \tan \left (f x + e\right )}}{4 i \, \sqrt {2} d^{\frac {3}{2}} + 4 \, \sqrt {2} \sqrt {d^{2}} \sqrt {d}}\right )}{f {\left (\frac {i \, d}{\sqrt {d^{2}}} + 1\right )}} - \frac {2 \, {\left (15 \, \sqrt {d \tan \left (f x + e\right )} a^{2} d^{9} f^{6} \tan \left (f x + e\right )^{3} - 42 i \, \sqrt {d \tan \left (f x + e\right )} a^{2} d^{9} f^{6} \tan \left (f x + e\right )^{2} - 70 \, \sqrt {d \tan \left (f x + e\right )} a^{2} d^{9} f^{6} \tan \left (f x + e\right ) + 210 i \, \sqrt {d \tan \left (f x + e\right )} a^{2} d^{9} f^{6}\right )}}{105 \, d^{7} f^{7}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.64, size = 115, normalized size = 0.82 \begin {gather*} \frac {a^2\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{5/2}\,4{}\mathrm {i}}{5\,f}-\frac {a^2\,d^2\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,4{}\mathrm {i}}{f}-\frac {2\,a^2\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{7/2}}{7\,d\,f}+\frac {4\,a^2\,d\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^{3/2}}{3\,f}-\frac {\sqrt {4{}\mathrm {i}}\,a^2\,d^{5/2}\,\mathrm {atan}\left (\frac {\sqrt {4{}\mathrm {i}}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}\,1{}\mathrm {i}}{2\,\sqrt {d}}\right )\,2{}\mathrm {i}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________